<%@ page language="java" contentType="text/html; charset=UTF-8"
 
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="webctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="${webctx}/images/dcfs/baobiao.css" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="${webctx}/js/jquery-1.7.2.min.js"></script>
<title>基站信息</title>

<style>
    body{margin:0; padding:0; font-size:12px; font-family:"黑体"; line-height:25px; font-weight:normal; overflow: auto;}
</style>
</head>
<body style="overflow: auto;">
<form action="" method="post" id="form1">
<div style="overflow:auto; position:relative; height:100%;">
   <div id="table">
		<table width="625" height="100%" border="0" align="center" cellpadding="0" cellspacing="1" style="margin:0 auto; margin-top:20px; margin-bottom:20px;background: #000000;" class="list">
		  <tr style='boder-bottom-style:none;'>
		    <td bgcolor="#ffffff" align="center" height='30px' colspan="9" valign="middle" class="title"><br/><h2><label id="jzmc1"></label>基站信息</h2><br/></td>
		  </tr>
		  <tr >
		    <td height="36" width="10%" align="center" bgcolor="#ffffff">基站名称</td>
		    <td width="10%" align="center" bgcolor="#ffffff">网络类型</td>
		    <td width="10%" align="center" bgcolor="#ffffff">发射公率（W）</td>
		    <td width="10%" align="center"  bgcolor="#ffffff">天线阵元增益（dBi）</td>
		    <td width="10%" align="center" bgcolor="#ffffff">天线挂高（m）</td>
		    <td width="10%" align="center" bgcolor="#ffffff">天线架设方式</td>
		    <td width="10%" align="center" bgcolor="#ffffff">下倾角（度）</td>
		    <td width="10%" align="center"  bgcolor="#ffffff">天线类型</td>
		    <td width="10%" align="center" bgcolor="#ffffff">共站类型</td>
		  </tr>
		  <tr>
		    <td height="36" width="10%" align="center" bgcolor="#ffffff"><label id="jzmc"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="wllx"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="bcgl"></label></td>
		    <td width="10%" align="center"  bgcolor="#ffffff"><label id="txzy"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="jsgd"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="jsfs"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="xpj"></label></td>
		    <td width="10%" align="center"  bgcolor="#ffffff"><label id="txlx"></label></td>
		    <td width="10%" align="center" bgcolor="#ffffff"><label id="jzbz"></label></td>
		  </tr>
		  <tr style='boder-top-style:none;'>
		    <td height="40" colspan="9" align="left" bgcolor="#f3fbfe">  基站环境描述：(经度：<label id="jd"></label> 纬度：<label id="wd"></label>)
			<p><label id="jzbz"></label></p></td>
		  </tr>
		  
		   <tr style='boder-top-style:none;'>
		    <td height="36" width="10%" align="center" bgcolor="#ffffff">检测时间</td>
		    <td colspan="3" align="center" bgcolor="#ffffff">2011年6月30日</td>
		    <td colspan="3" align="center" bgcolor="#ffffff">天气状况</td>
		    <td colspan="2" align="center"  bgcolor="#ffffff">多云</td>
		  </tr>
		  <tr>
		    <td height="36" width="10%" align="center" bgcolor="#ffffff">环境温度</td>
		    <td width="10%" align="center" bgcolor="#ffffff">24~32℃</td>
		    <td colspan="2" align="center" bgcolor="#ffffff">相对湿度</td>
		    <td width="10%" align="center" bgcolor="#ffffff">60%~80%</td>
		    <td colspan="2" align="center" bgcolor="#ffffff">风速</td>
		    <td colspan="2" align="center"  bgcolor="#ffffff">&lt;3m/s</td>
		  </tr>
		   <tr>
		    <td colspan="9" bgcolor="#ffffff" align="center" class="img" width="90%" height="500" id="imgUrl"></td>
		    <!--http://192.168.50.140:9080  -->
		  </tr>   
		</table>
   </div>   
 	<div id="div1" align="center">
	    <input type="button" name="Word" value="导出表格" onClick="test()" id="sub"/>
	    <input type="button" name="button" id="button" value="打印" onClick="unloadWord();javascript:print();" />
	    <input  type="button" onclick="ret()" value="返回"/>
	    <input type="hidden" id="tableInfo" name="tableInfo" value=""/>
 	</div>
</div>

</form>
   <script type="text/javascript">
     function unloadWord(){
		document.getElementById("form1").removeChild(document.getElementById("div1"));
	}
	var url = location.search;
	var theRequest = new Object(); 
    if (url.indexOf("?") != -1) { 
       var str = url.substr(1); 
       strs = str.split("&"); 
       var jzsbbh=strs[0].split("=")[1];
       var tsbh=strs[1].split("=")[1];
      // alert(tsbh);
    }
	var param={'dcfsJzSbJbxx.jzsbbh':jzsbbh};
	var param2={'dcfsDocument.jzsbbh':jzsbbh,'dcfsDocument.doctype':'图片'};
	var html="";
	$.ajax({
		url:"{webctx}/tsjzsb_getDcfsJzSbJbxxList_ggts.action",
		method:"POST",
		data:param,
		params:{},
		success:function(object,bool,response){
			wry_points=eval(response.responseText);//jQuery.parseJSON(object.responseText);
			///alert(wry_points[0].jzbh);
			$("#jzmc").html(wry_points[0].jzmc==""?"-":wry_points[0].jzmc);
			$("#jzmc1").html(wry_points[0].jzmc==""?"-":wry_points[0].jzmc);
			$("#wllx").html(wry_points[0].jzsbwllx==""?"-":wry_points[0].jzsbwllx);
			$("#bcgl").html(wry_points[0].jzbcgl==""?"-":wry_points[0].jzbcgl);
			$("#txzy").html(wry_points[0].jztxzy==""?"-":wry_points[0].jztxzy);
			$("#jsgd").html(wry_points[0].jzfstxjsgd==""?"-":wry_points[0].jzfstxjsgd);
			$("#jsfs").html(wry_points[0].jzfstxjsfs==""?"-":wry_points[0].jzfstxjsfs);
			$("#xpj").html(wry_points[0].jzfstxxpj==""?"-":wry_points[0].jzfstxxpj);
			$("#txlx").html(wry_points[0].jzfstxlx==""?"-":wry_points[0].jzfstxlx);
			$("#jzbz").html(wry_points[0].jzbz==""?"-":wry_points[0].jzbz);
			$("#jd").html(wry_points[0].jzfstxjd==""?"-":wry_points[0].jzfstxjd);
			$("#wd").html(wry_points[0].jzfstxwd==""?"-":wry_points[0].jzfstxwd);
			$("#jzbz").html(wry_points[0].jzbz==""?"-":wry_points[0].jzbz);
			$.ajax({
				async:false,
				type:"POST",
				url:"${webctx}/doc_getDcfsDocmentListByCond.action",
				data:param2,
				success:function(object,bool,response){
					var jzsb_result=eval(response.responseText);
					for(var i=0;i<jzsb_result.length;i++){
						html+="<img src='"+jzsb_result[i].docurl+"' width='95%' height='350' align='middle' /></br>";
					}
					$("#imgUrl").html(html);
				},
				failure:function(response){
					alert("加载失败");
				}
			});	
		},
		failure:function(response){
			Ext.Msg.alert("提示","操作出现了异常！");
		}
	});
	
	function ret(){
		//alert("ss");
		window.location.href="${webctx }/dcfs_ggts/dcfs_ggts_cl_jbxx.jsp?id="+tsbh+"&sb="+jzsbbh;
	}
    function test(){
       // document.getElementById("tableInfo").value=document.getElementById("table").innerHTML;
       // alert($("#jzmc").val());
       //	document.getElementById("form1").action="${webctx }/exp_ExportToWord.action?sbmc="+$("#jzmc").text();
       	//document.getElementById("form1").submit()
    	location.href = "${webctx }/exp_ExportToWordNew.action?jzsbbh="+jzsbbh;
     }
</script>
</body>
 
</html>
